import request from '../../utils/request'

export const noticeApi = {
  getAllList() {
    return request({
      url: '/notices/all/list',
      method: 'get'
    })
  },
  markAsRead(id) {
    return request({
      url: `/notices/read/${id}`,
      method: 'put'
    })
  },
  markAllAsRead() {
    return request({
      url: '/notices/read/all',
      method: 'put'
    })
  },
  hasUnread() {
    return request({
      url: '/notices/unread/exist',
      method: 'get'
    })
  }
}
